package com.xyyhome.web.system.domain;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_s_logs", schema = "xyyhome", catalog = "")
public class YSLogs {
    private String yslId;
    private String yslType;
    private String yslType2;
    private Timestamp yslCreateTime;
    private String yslUserId;
    private String yslTargetId;
    private String yslTargetType;
    private String yslTargetId2;
    private String yslTargetType2;
    private String yslRemark;

    @Id
    @Column(name = "ysl_id", nullable = false, length = 36)
    public String getYslId() {
        return yslId;
    }

    public void setYslId(String yslId) {
        this.yslId = yslId;
    }

    @Basic
    @Column(name = "ysl_type", nullable = true, length = 10)
    public String getYslType() {
        return yslType;
    }

    public void setYslType(String yslType) {
        this.yslType = yslType;
    }

    @Basic
    @Column(name = "ysl_type2", nullable = true, length = 10)
    public String getYslType2() {
        return yslType2;
    }

    public void setYslType2(String yslType2) {
        this.yslType2 = yslType2;
    }

    @Basic
    @Column(name = "ysl_create_time", nullable = true)
    public Timestamp getYslCreateTime() {
        return yslCreateTime;
    }

    public void setYslCreateTime(Timestamp yslCreateTime) {
        this.yslCreateTime = yslCreateTime;
    }

    @Basic
    @Column(name = "ysl_user_id", nullable = true, length = 36)
    public String getYslUserId() {
        return yslUserId;
    }

    public void setYslUserId(String yslUserId) {
        this.yslUserId = yslUserId;
    }

    @Basic
    @Column(name = "ysl_target_id", nullable = true, length = 36)
    public String getYslTargetId() {
        return yslTargetId;
    }

    public void setYslTargetId(String yslTargetId) {
        this.yslTargetId = yslTargetId;
    }

    @Basic
    @Column(name = "ysl_target_type", nullable = true, length = 10)
    public String getYslTargetType() {
        return yslTargetType;
    }

    public void setYslTargetType(String yslTargetType) {
        this.yslTargetType = yslTargetType;
    }

    @Basic
    @Column(name = "ysl_target_id2", nullable = true, length = 36)
    public String getYslTargetId2() {
        return yslTargetId2;
    }

    public void setYslTargetId2(String yslTargetId2) {
        this.yslTargetId2 = yslTargetId2;
    }

    @Basic
    @Column(name = "ysl_target_type2", nullable = true, length = 10)
    public String getYslTargetType2() {
        return yslTargetType2;
    }

    public void setYslTargetType2(String yslTargetType2) {
        this.yslTargetType2 = yslTargetType2;
    }

    @Basic
    @Column(name = "ysl_remark", nullable = true, length = 200)
    public String getYslRemark() {
        return yslRemark;
    }

    public void setYslRemark(String yslRemark) {
        this.yslRemark = yslRemark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YSLogs ysLogs = (YSLogs) o;

        if (yslId != null ? !yslId.equals(ysLogs.yslId) : ysLogs.yslId != null) return false;
        if (yslType != null ? !yslType.equals(ysLogs.yslType) : ysLogs.yslType != null) return false;
        if (yslType2 != null ? !yslType2.equals(ysLogs.yslType2) : ysLogs.yslType2 != null) return false;
        if (yslCreateTime != null ? !yslCreateTime.equals(ysLogs.yslCreateTime) : ysLogs.yslCreateTime != null)
            return false;
        if (yslUserId != null ? !yslUserId.equals(ysLogs.yslUserId) : ysLogs.yslUserId != null) return false;
        if (yslTargetId != null ? !yslTargetId.equals(ysLogs.yslTargetId) : ysLogs.yslTargetId != null) return false;
        if (yslTargetType != null ? !yslTargetType.equals(ysLogs.yslTargetType) : ysLogs.yslTargetType != null)
            return false;
        if (yslTargetId2 != null ? !yslTargetId2.equals(ysLogs.yslTargetId2) : ysLogs.yslTargetId2 != null)
            return false;
        if (yslTargetType2 != null ? !yslTargetType2.equals(ysLogs.yslTargetType2) : ysLogs.yslTargetType2 != null)
            return false;
        if (yslRemark != null ? !yslRemark.equals(ysLogs.yslRemark) : ysLogs.yslRemark != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = yslId != null ? yslId.hashCode() : 0;
        result = 31 * result + (yslType != null ? yslType.hashCode() : 0);
        result = 31 * result + (yslType2 != null ? yslType2.hashCode() : 0);
        result = 31 * result + (yslCreateTime != null ? yslCreateTime.hashCode() : 0);
        result = 31 * result + (yslUserId != null ? yslUserId.hashCode() : 0);
        result = 31 * result + (yslTargetId != null ? yslTargetId.hashCode() : 0);
        result = 31 * result + (yslTargetType != null ? yslTargetType.hashCode() : 0);
        result = 31 * result + (yslTargetId2 != null ? yslTargetId2.hashCode() : 0);
        result = 31 * result + (yslTargetType2 != null ? yslTargetType2.hashCode() : 0);
        result = 31 * result + (yslRemark != null ? yslRemark.hashCode() : 0);
        return result;
    }
}
